#include "../d_Math/d_Math.h"
#include "ray.h"

using namespace d_Math;

#ifndef CAMERA_H_
#define CAMERA_H_

class Camera
{
public:
	virtual Ray generateRay(d_Vec2f point) = 0; 
	virtual float getTMin() const = 0;
	float tmin;
};

class OrthographicCamera : public Camera
{
public:
	OrthographicCamera(d_Vec3f c, d_Vec3f d, d_Vec3f u, float tam);
	Ray generateRay(d_Vec2f point);
	float getTMin() const;
protected:
	d_Vec3f center;
	d_Vec3f dir;
	d_Vec3f up;
	d_Vec3f hor;
	float size; 
};

class PerspectiveCamera : public Camera
{
public:
	PerspectiveCamera(d_Vec3f c, d_Vec3f d, d_Vec3f u, float tam);
	Ray generateRay(d_Vec2f point);
	float getTMin() const;
protected:
	d_Vec3f center;
	d_Vec3f dir;
	d_Vec3f up;
	d_Vec3f hor;
	float angle; 
	float dist;
};

#endif /*CAMERA_H_*/

